package com.lvmama.rhino.enums;

public enum NpsQuestionTypeEnum {
    OUTER("0","外部"),
    INTERNAL("1","内部");

    private String code;
    private String showName;

    NpsQuestionTypeEnum(String code, String showName) {
        this.code = code;
        this.showName = showName;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getShowName() {
        return showName;
    }

    public void setShowName(String showName) {
        this.showName = showName;
    }

    /**
     * 获取枚举
     * @param code
     * @return
     */
    public static NpsQuestionTypeEnum getEnum(String code){
        for (NpsQuestionTypeEnum en : NpsQuestionTypeEnum.values()){
            if(en.getCode().equals(code)){
                return en;
            }
        }
        return null;
    }
}
